Programming by Analogy: Retrieval, Mapping, Adaptation and Generalization of Recursive Program Schemes
نویسندگان
چکیده
We present an approach to program reuse by analogical transfer based upon the notion of recursive program schemes (RPSs). RPSs are representations which capture the structure of a program and are executable (if the symbols are interpreted by operator symbols of a functional programming language). This kind of representation is extremly useful for programming by analogy. The general outline of our approach is as follows: we start with a straight-forward program (initial program) which can be seen as handsimulation for transforming a fixed input into the corresponding output value. The desired iterative (recursive) program generalizing over the fixed input (RPS) is constructed by analogical transfer of an already known RPS which is structural similar to the new programming problem. Source and target RPSs are generalized to an RPS representing the common structure of both problems. Target RPS and generalized RPS are stored in memory with the generalized RPS as parent to source and target. By building a hierachical memory of generalized RPSs we can use programs as well as abstract schemes as sources. In this paper we present our approach to retrieval from and stepwise construction of an hierarchical memory and an algorithm and first results for adaptation of isomorphical and non-isomorphical sources.
منابع مشابه
Program Reuse and Abstraction by Anti{uniication
In this paper we present an approach to case{based programming based on anti{uniication. We focus on acquiring a hierarchy of recursive program schemes from programming experience. For a new programming problem a concrete program or a scheme can be reused, that is, we can deal with analogy and abstraction in a uniform way. We investigate a minimal extension of rst order anti{uniication, allowin...
متن کاملSkill Acquisition Can Be Regarded as Program Synthesis: An Integrative Approach to Learning by Doing and Learning by Analogy
In this paper we propose an approach to skill acquisition which is based on a technique for inductive program synthesis developed in the domain of automatic programming. This approach enables us to model skill acquisition as generalization on three levels: In a rst step, learning by doing is performed by generalizing over problem states which were explored when solving a given problem. This pro...
متن کاملInduction of Recursive Program Schemes
In this paper we present an approach to the induction of re-cursive structures from examples which is based on the notion of recursive program schemes. We separate induction from examples in two stages: (1) constructing initial programs from examples and (2) folding initial programs to recursive program schemes. By this separation, the induction of recursive program schemes can be reduced to a ...
متن کاملHigher type recursive program schemes and the nested pushdown automaton
When implementing recursive programs on a standard von Neumann random access machine (RAM) it is natural and well known how to use a pushdown store in order to keep track of the recursive procedure calls when the program runs. The more abstract world of program schemes abounds with examples of this pushdown – recursion relation. As a concrete example it is well known how to implement monadic re...
متن کاملA Unifying Approach to Learning by Doing and Learning by Analogy
We present an approach to learning cognitive skills from problem solving experience { addressing some phenomena well known from human learning but seldom covered together in machine learning. The core of our approach is the acquisition of (recursive) program schemes (RPSs) by generalization-ton over plans, using an inductive program technique. RPSs represent domain speciic control knowledge, th...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1998